.gl-responsive-table-row{ id: dom_id(runner) }
  = render layout: 'runner_table_cell', locals: { label: _('Type') } do
    - if runner.instance_type?
      %span.badge.badge-success shared
    - elsif runner.group_type?
      %span.badge.badge-success group
    - else
      %span.badge.badge-info specific
    - if runner.locked?
      %span.badge.badge-warning locked
    - unless runner.active?
      %span.badge.badge-danger paused

  = render layout: 'runner_table_cell', locals: { label: _('Runner token') } do
    = link_to runner.short_sha, admin_runner_path(runner)

  = render layout: 'runner_table_cell', locals: { label: _('Description') } do
    = runner.description

  = render layout: 'runner_table_cell', locals: { label: _('Version') } do
    = runner.version

  = render layout: 'runner_table_cell', locals: { label: _('IP Address') } do
    = runner.ip_address

  = render layout: 'runner_table_cell', locals: { label: _('Projects') } do
    - if runner.instance_type? || runner.group_type?
      = _('n/a')
    - else
      = runner.projects.count(:all)

  = render layout: 'runner_table_cell', locals: { label: _('Jobs') } do
    = runner.builds.count(:all)

  = render layout: 'runner_table_cell', locals: { label: _('Tags') } do
    - runner.tag_list.sort.each do |tag|
      %span.badge.badge-primary
        = tag

  = render layout: 'runner_table_cell', locals: { label: _('Last contact') } do
    - if runner.contacted_at
      = time_ago_with_tooltip runner.contacted_at
    - else
      = _('Never')

  .table-section.table-button-footer.section-10
    .btn-group.table-action-buttons
      .btn-group
        = link_to admin_runner_path(runner), class: 'btn btn-default has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do
          = icon('pencil')
      .btn-group
        - if runner.active?
          = link_to [:pause, :admin, runner], method: :get, class: 'btn btn-default has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do
            = icon('pause')
        - else
          = link_to [:resume, :admin, runner], method: :get, class: 'btn btn-default has-tooltip', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do
            = icon('play')
      .btn-group
        = link_to [:admin, runner], method: :delete, class: 'btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do
          = icon('remove')
